<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>局部组件</title>
    <style href="assers/css/style.css" ref="stylesheet"></style>
</head>

<body>
    <div id="app">
        <my-component>
        </my-component>
    </div>
</body>
<script src="assets/js/vue.js"></script>
<script>
    var myComponent = Vue.extend({
        template: "<div>局部组件</div>"
    });
    new Vue({
        el: "#app",
        components: {
            "my-component": myComponent
        }
    });

</script>

</html>